#pragma once
#include <dxgi1_4.h>
#include <wrl.h>
#include <d3d12.h>

#include "../../Utility/Predeclare.h"
#include "../NBRenderEngine/NBRenderEngine.h"

#include "D3D12DescHeapManager.h"

using Microsoft::WRL::ComPtr;
namespace EngineRender {
	class NBRenderEngineDX12 : public NBRenderEngine
	{
	public:
		NBRenderEngineDX12();
		~NBRenderEngineDX12();
		virtual _hr SetUp(EngineCore::EngineProperty& prop, PlatformLayer& platform) override;
		virtual _hr Launch() override;
		virtual _hr Render() override;

	public:

	protected:


	protected:

		ComPtr<ID3D12Device> m_device;
		ComPtr<ID3D12CommandQueue> m_cmdQueue_high_direct;
		ComPtr<IDXGISwapChain3> m_swapChain;

		std::vector<ComPtr<ID3D12Resource>> m_renderTarget;

		D3D12DescHeapManager m_heapManager;

		//tempt 
		D3D12_VIEWPORT m_viewPort;
		D3D12_RECT m_scissorRect;
		ComPtr<ID3D12CommandAllocator> m_cmdAlloc;
		ComPtr<ID3D12GraphicsCommandList> m_cmdList;
		ComPtr<ID3D12Fence> m_fence;
		HANDLE m_fenceEvent;
		UINT64 m_fenceNum;
		//end
		
	};

}